/*
 * If you use long long, it fails!!! Runtime Error. Damn....
 */

#include <stdio.h>
#define MAXFIB 50

int main(){
  int fib[MAXFIB];
  int i, scenario, query;

  fib[0] = 1;
  fib[1] = 2;

  for(i = 2; i <= MAXFIB; i++)
    fib[i] = fib[i-1] + fib[i-2];

  scanf("%d", &scenario);
  for(i = 1; i <= scenario; i++){
    scanf("%d", &query);
    printf("Scenario #%d:\n", i);
    printf("%d\n\n", fib[query]);
  }

  return 0;
}
